Change in openvpn[master]: dev-tools: Fix run-cppcheck to cover more code
A message that is not in the archive (sent off-list or not yet received): gerrit.1778102459000.I05720ccc3bcf706bbe62254afb74562580f5de56@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1665?usp=email
to review the following change.
Change subject: dev-tools: Fix run-cppcheck to cover more code
......................................................................
dev-tools: Fix run-cppcheck to cover more code
When specifying any -D argument all other defines
are ignored unless --force is specified as well.
I mistakenly assumed that this was covered by
--check-level=exhaustive.
---
M dev-tools/cppcheck-suppression
M dev-tools/run-cppcheck.sh
2 files changed, 10 insertions(+), 5 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/65/1665/1
dev-tools/cppcheck-suppression +8 -3
@@ -22,23 +22,28 @@ # IGN: the code header = 0 | (OPCODE << P_OPCODE_SHIFT) is used intentionally badBitmaskCheck:src/openvpn/mudp.c badBitmaskCheck:tests/unit_tests/openvpn/test_pkt.c +# IGN: we store integers in pointers +CastAddressToIntegerAtReturn:src/openvpn/multi.c # IGN: event code uses a pointer to store integers intToPointerCast:src/openvpn/multi_io.c intToPointerCast:src/openvpn/forward.c # FP: crt_error is always true on Unix, but not Windows knownConditionTrueFalse:src/openvpn/error.h:380 # FP: code needs to accomodate many different defines +knownConditionTrueFalse:src/openvpn/event.c:1139 knownConditionTrueFalse:src/openvpn/event.c:1148 +# FP: always true on Windows, but not Unix +knownConditionTrueFalse:src/openvpn/fdmisc.c:80 # FP: dco_win support has "false" stubs knownConditionTrueFalse:src/openvpn/forward.c knownConditionTrueFalse:src/openvpn/init.c knownConditionTrueFalse:src/openvpn/multi_io.c:163 -# FP: cppcheck thinks that management_query_user_pass is always true, -# but no idea why +# FP: cppcheck thinks that some functions always return true, but they don't knownConditionTrueFalse:src/openvpn/misc.c:97 +knownConditionTrueFalse:src/openvpn/sig.h:116 # FP: cert_uri_supported is a wrapper around defines, so it's # always constant but differs depending on OpenSSL version -knownConditionTrueFalse:src/openvpn/ssl_openssl.c:1258 +knownConditionTrueFalse:src/openvpn/ssl_openssl.c:1332 # FP: cppcheck doesn't understand that the function changes szErrMessage knownConditionTrueFalse:src/tapctl/main.c:704 knownConditionTrueFalse:src/openvpnmsica/dllmain.c:164
dev-tools/run-cppcheck.sh +2 -2
@@ -13,7 +13,7 @@ mkdir -p "$CPPCHECK_DIR" cd "${SOURCE_DIR}" cppcheck -j$(nproc) \ - -DHAVE_CONFIG_H -U_WIN32 \ + -DHAVE_CONFIG_H \ -DMBEDTLS_SSL_PROTO_TLS1_3 -DMBEDTLS_SSL_KEYING_MATERIAL_EXPORT \ -I./include/ -I./tests/unit_tests/openvpn/ \ -I./src/compat/ -I./src/openvpn/ -I./src/openvpnserv/ -I./src/plugins/auth-pam/ \
@@ -21,6 +21,6 @@ --enable=all \ --suppressions-list="${SCRIPT_DIR}/cppcheck-suppression" \ --cppcheck-build-dir="${CPPCHECK_DIR}" \ - --check-level=exhaustive \ + --check-level=exhaustive --force \ --error-exitcode=1 \ src/ tests/ sample/
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1665?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I05720ccc3bcf706bbe62254afb74562580f5de56
Gerrit-Change-Number: 1665
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Attention is currently required from: plaisthos.
flichtenheld has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1665?usp=email )
Change subject: dev-tools: Fix run-cppcheck to cover more code
......................................................................
Set Ready For Review
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1665?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I05720ccc3bcf706bbe62254afb74562580f5de56
Gerrit-Change-Number: 1665
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Comment-Date: Fri, 08 May 2026 11:47:59 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No